﻿<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
  
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Class Simulation
   </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Class Simulation
   ">
    <meta name="generator" content="docfx 2.52.0.0">
    
    <link rel="shortcut icon" href="../api/images/favicon.ico">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> 
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">
    <script type="text/javascript" async="" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"></script>
    
    
    
  </head>  <body data-spy="scroll" data-target="#affix" data-offset="120">
    <div id="wrapper">
      <header>
        
        <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
          <div class="container">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
              
              <a class="navbar-brand" href="../index.html">
                <img id="logo" class="svg" src="../api/images/favicon.svg" alt="">
              </a>
            </div>
            <div class="collapse navbar-collapse" id="navbar">
              <form class="navbar-form navbar-right" role="search" id="search">
                <div class="form-group">
                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
                </div>
              </form>
            </div>
          </div>
        </nav>
        
        <div class="subnav navbar navbar-default">
          <div class="container hide-when-search" id="breadcrumb">
            <ul class="breadcrumb">
              <li></li>
            </ul>
          </div>
        </div>
      </header>
      <div role="main" class="container body-content hide-when-search">
        
        <div class="sidenav hide-when-search">
          <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
          <div class="sidetoggle collapse" id="sidetoggle">
            <div id="sidetoc"></div>
          </div>
        </div>
        <div class="article row grid-right">
          <div class="col-md-10">
            <article class="content wrap" id="_content" data-uid="SpiceSharp.Simulations.Simulation">
  
  
  <h1 id="SpiceSharp_Simulations_Simulation" data-uid="SpiceSharp.Simulations.Simulation" class="text-break">Class Simulation
  </h1>
  <div class="markdown level0 summary"><p>A template for any simulation.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><span class="xref">System.Object</span></div>
    <div class="level1"><a class="xref" href="SpiceSharp.ParameterSets.ParameterSet.html">ParameterSet</a></div>
    <div class="level2"><a class="xref" href="SpiceSharp.ParameterSets.ParameterSetCollection.html">ParameterSetCollection</a></div>
    <div class="level3"><span class="xref">Simulation</span></div>
      <div class="level4"><a class="xref" href="SpiceSharp.Simulations.BiasingSimulation.html">BiasingSimulation</a></div>
  </div>
  <div classs="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="SpiceSharp.Simulations.IEventfulSimulation.html">IEventfulSimulation</a></div>
    <div><a class="xref" href="SpiceSharp.Simulations.ISimulation.html">ISimulation</a></div>
    <div><a class="xref" href="SpiceSharp.Simulations.IStateful.html">IStateful</a></div>
    <div><a class="xref" href="SpiceSharp.Simulations.IBehavioral.html">IBehavioral</a></div>
    <div><a class="xref" href="SpiceSharp.ParameterSets.IParameterSetCollection.html">IParameterSetCollection</a></div>
    <div><a class="xref" href="SpiceSharp.ParameterSets.IParameterSet.html">IParameterSet</a></div>
    <div><a class="xref" href="SpiceSharp.ICloneable.html">ICloneable</a></div>
  </div>
  <div class="inheritedMembers">
    <h5>Inherited Members</h5>
    <div>
      <a class="xref" href="SpiceSharp.ParameterSets.ParameterSetCollection.html#SpiceSharp_ParameterSets_ParameterSetCollection_GetParameterSet__1">ParameterSetCollection.GetParameterSet&lt;P&gt;()</a>
    </div>
    <div>
      <a class="xref" href="SpiceSharp.ParameterSets.ParameterSetCollection.html#SpiceSharp_ParameterSets_ParameterSetCollection_TryGetParameterSet__1___0__">ParameterSetCollection.TryGetParameterSet&lt;P&gt;(P)</a>
    </div>
    <div>
      <a class="xref" href="SpiceSharp.ParameterSets.ParameterSetCollection.html#SpiceSharp_ParameterSets_ParameterSetCollection_SetParameter__1_System_String___0_">ParameterSetCollection.SetParameter&lt;P&gt;(String, P)</a>
    </div>
    <div>
      <a class="xref" href="SpiceSharp.ParameterSets.ParameterSetCollection.html#SpiceSharp_ParameterSets_ParameterSetCollection_TrySetParameter__1_System_String___0_">ParameterSetCollection.TrySetParameter&lt;P&gt;(String, P)</a>
    </div>
    <div>
      <a class="xref" href="SpiceSharp.ParameterSets.ParameterSetCollection.html#SpiceSharp_ParameterSets_ParameterSetCollection_GetProperty__1_System_String_">ParameterSetCollection.GetProperty&lt;P&gt;(String)</a>
    </div>
    <div>
      <a class="xref" href="SpiceSharp.ParameterSets.ParameterSetCollection.html#SpiceSharp_ParameterSets_ParameterSetCollection_TryGetProperty__1_System_String___0__">ParameterSetCollection.TryGetProperty&lt;P&gt;(String, P)</a>
    </div>
    <div>
      <a class="xref" href="SpiceSharp.ParameterSets.ParameterSetCollection.html#SpiceSharp_ParameterSets_ParameterSetCollection_CreateParameterSetter__1_System_String_">ParameterSetCollection.CreateParameterSetter&lt;P&gt;(String)</a>
    </div>
    <div>
      <a class="xref" href="SpiceSharp.ParameterSets.ParameterSetCollection.html#SpiceSharp_ParameterSets_ParameterSetCollection_CreatePropertyGetter__1_System_String_">ParameterSetCollection.CreatePropertyGetter&lt;P&gt;(String)</a>
    </div>
    <div>
      <a class="xref" href="SpiceSharp.ParameterSets.ParameterSetCollection.html#SpiceSharp_ParameterSets_ParameterSetCollection_ParameterSets">ParameterSetCollection.ParameterSets</a>
    </div>
    <div>
      <a class="xref" href="SpiceSharp.ParameterSets.ParameterSet.html#SpiceSharp_ParameterSets_ParameterSet_Clone">ParameterSet.Clone()</a>
    </div>
    <div>
      <a class="xref" href="SpiceSharp.ParameterSets.ParameterSet.html#SpiceSharp_ParameterSets_ParameterSet_SpiceSharp_ICloneable_Clone">ParameterSet.ICloneable.Clone()</a>
    </div>
    <div>
      <a class="xref" href="SpiceSharp.ParameterSets.ParameterSet.html#SpiceSharp_ParameterSets_ParameterSet_CopyFrom_SpiceSharp_ICloneable_">ParameterSet.CopyFrom(ICloneable)</a>
    </div>
    <div>
      <a class="xref" href="SpiceSharp.ParameterSets.ParameterSet.html#SpiceSharp_ParameterSets_ParameterSet_SpiceSharp_ICloneable_CopyFrom_SpiceSharp_ICloneable_">ParameterSet.ICloneable.CopyFrom(ICloneable)</a>
    </div>
    <div>
      <span class="xref">System.Object.ToString()</span>
    </div>
    <div>
      <span class="xref">System.Object.Equals(System.Object)</span>
    </div>
    <div>
      <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
    </div>
    <div>
      <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
    </div>
    <div>
      <span class="xref">System.Object.GetHashCode()</span>
    </div>
    <div>
      <span class="xref">System.Object.GetType()</span>
    </div>
    <div>
      <span class="xref">System.Object.MemberwiseClone()</span>
    </div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="SpiceSharp.Simulations.html">SpiceSharp.Simulations</a></h6>
  <h6><strong>Assembly</strong>: SpiceSharp.dll</h6>
  <h5 id="SpiceSharp_Simulations_Simulation_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public abstract class Simulation : ParameterSetCollection, IEventfulSimulation, ISimulation, IStateful, IBehavioral, IParameterSetCollection, IParameterSet, ICloneable</code></pre>
  </div>
  <h3 id="constructors">Constructors
  </h3>
  <a id="SpiceSharp_Simulations_Simulation__ctor_" data-uid="SpiceSharp.Simulations.Simulation.#ctor*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation__ctor_System_String_" data-uid="SpiceSharp.Simulations.Simulation.#ctor(System.String)">Simulation(String)</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="SpiceSharp.Simulations.Simulation.html">Simulation</a> class.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected Simulation(string name)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.String</span></td>
        <td><span class="parametername">name</span></td>
        <td><p>The name of the simulation.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.ArgumentNullException</span></td>
        <td><p>Thrown if <code data-dev-comment-type="paramref" class="paramref">name</code> is <code>null</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
  </h3>
  <a id="SpiceSharp_Simulations_Simulation_Behaviors_" data-uid="SpiceSharp.Simulations.Simulation.Behaviors*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_Behaviors" data-uid="SpiceSharp.Simulations.Simulation.Behaviors">Behaviors</h4>
  <div class="markdown level1 summary"><p>Gets all behavior types that are used by the class.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public virtual IEnumerable&lt;Type&gt; Behaviors { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;<span class="xref">System.Type</span>&gt;</td>
        <td><p>The behaviors.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_EntityBehaviors_" data-uid="SpiceSharp.Simulations.Simulation.EntityBehaviors*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_EntityBehaviors" data-uid="SpiceSharp.Simulations.Simulation.EntityBehaviors">EntityBehaviors</h4>
  <div class="markdown level1 summary"><p>Gets the entity behaviors.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IBehaviorContainerCollection EntityBehaviors { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Behaviors.IBehaviorContainerCollection.html">IBehaviorContainerCollection</a></td>
        <td><p>The entity behaviors.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_Name_" data-uid="SpiceSharp.Simulations.Simulation.Name*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_Name" data-uid="SpiceSharp.Simulations.Simulation.Name">Name</h4>
  <div class="markdown level1 summary"><p>Gets the name of the <a class="xref" href="SpiceSharp.Simulations.ISimulation.html">ISimulation</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public string Name { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.String</span></td>
        <td><p>The name.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_States_" data-uid="SpiceSharp.Simulations.Simulation.States*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_States" data-uid="SpiceSharp.Simulations.Simulation.States">States</h4>
  <div class="markdown level1 summary"><p>Gets all the states that the class uses.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public virtual IEnumerable&lt;Type&gt; States { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Collections.Generic.IEnumerable</span>&lt;<span class="xref">System.Type</span>&gt;</td>
        <td><p>The states.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_Statistics_" data-uid="SpiceSharp.Simulations.Simulation.Statistics*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_Statistics" data-uid="SpiceSharp.Simulations.Simulation.Statistics">Statistics</h4>
  <div class="markdown level1 summary"><p>Gets the statistics.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public SimulationStatistics Statistics { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.SimulationStatistics.html">SimulationStatistics</a></td>
        <td><p>The statistics.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_Status_" data-uid="SpiceSharp.Simulations.Simulation.Status*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_Status" data-uid="SpiceSharp.Simulations.Simulation.Status">Status</h4>
  <div class="markdown level1 summary"><p>Gets the current status of the <a class="xref" href="SpiceSharp.Simulations.ISimulation.html">ISimulation</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public SimulationStatus Status { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.SimulationStatus.html">SimulationStatus</a></td>
        <td><p>The current status.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
  </h3>
  <a id="SpiceSharp_Simulations_Simulation_CreateBehaviors_" data-uid="SpiceSharp.Simulations.Simulation.CreateBehaviors*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_CreateBehaviors_SpiceSharp_Entities_IEntityCollection_" data-uid="SpiceSharp.Simulations.Simulation.CreateBehaviors(SpiceSharp.Entities.IEntityCollection)">CreateBehaviors(IEntityCollection)</h4>
  <div class="markdown level1 summary"><p>Creates all behaviors for the simulation.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected virtual void CreateBehaviors(IEntityCollection entities)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Entities.IEntityCollection.html">IEntityCollection</a></td>
        <td><span class="parametername">entities</span></td>
        <td><p>The entities.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.ArgumentNullException</span></td>
        <td><p>Thrown if <code data-dev-comment-type="paramref" class="paramref">entities</code> is <code>null</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_CreateStates_" data-uid="SpiceSharp.Simulations.Simulation.CreateStates*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_CreateStates" data-uid="SpiceSharp.Simulations.Simulation.CreateStates">CreateStates()</h4>
  <div class="markdown level1 summary"><p>Creates all the simulation states for the simulation.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected abstract void CreateStates()</code></pre>
  </div>
  <a id="SpiceSharp_Simulations_Simulation_Execute_" data-uid="SpiceSharp.Simulations.Simulation.Execute*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_Execute" data-uid="SpiceSharp.Simulations.Simulation.Execute">Execute()</h4>
  <div class="markdown level1 summary"><p>Executes the simulation.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected abstract void Execute()</code></pre>
  </div>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.SpiceSharpException.html">SpiceSharpException</a></td>
        <td><p>Thrown if the simulation can&apos;t continue.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_Finish_" data-uid="SpiceSharp.Simulations.Simulation.Finish*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_Finish" data-uid="SpiceSharp.Simulations.Simulation.Finish">Finish()</h4>
  <div class="markdown level1 summary"><p>Finish the simulation.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected abstract void Finish()</code></pre>
  </div>
  <a id="SpiceSharp_Simulations_Simulation_GetState_" data-uid="SpiceSharp.Simulations.Simulation.GetState*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_GetState__1" data-uid="SpiceSharp.Simulations.Simulation.GetState``1">GetState&lt;S&gt;()</h4>
  <div class="markdown level1 summary"><p>Gets the state of the specified type.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public virtual S GetState&lt;S&gt;()
    where S : ISimulationState</code></pre>
  </div>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">S</span></td>
        <td><p>The type, or <code>null</code> if the state isn&apos;t used.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">S</span></td>
        <td><p>The simulation state type.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.TypeNotFoundException.html">TypeNotFoundException</a></td>
        <td><p>Thrown if the simulation state is not defined on this instance.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_OnAfterExecute_" data-uid="SpiceSharp.Simulations.Simulation.OnAfterExecute*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_OnAfterExecute_SpiceSharp_Simulations_AfterExecuteEventArgs_" data-uid="SpiceSharp.Simulations.Simulation.OnAfterExecute(SpiceSharp.Simulations.AfterExecuteEventArgs)">OnAfterExecute(AfterExecuteEventArgs)</h4>
  <div class="markdown level1 summary"><p>Raises the <a class="xref" href="SpiceSharp.Simulations.Simulation.html#SpiceSharp_Simulations_Simulation_AfterSetup">AfterSetup</a> event.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected virtual void OnAfterExecute(AfterExecuteEventArgs args)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.AfterExecuteEventArgs.html">AfterExecuteEventArgs</a></td>
        <td><span class="parametername">args</span></td>
        <td><p>The <span class="xref">System.EventArgs</span> instance containing the event data.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_OnAfterSetup_" data-uid="SpiceSharp.Simulations.Simulation.OnAfterSetup*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_OnAfterSetup_System_EventArgs_" data-uid="SpiceSharp.Simulations.Simulation.OnAfterSetup(System.EventArgs)">OnAfterSetup(EventArgs)</h4>
  <div class="markdown level1 summary"><p>Raises the <a class="xref" href="SpiceSharp.Simulations.Simulation.html#SpiceSharp_Simulations_Simulation_AfterSetup">AfterSetup</a> event.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected virtual void OnAfterSetup(EventArgs args)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventArgs</span></td>
        <td><span class="parametername">args</span></td>
        <td><p>The <span class="xref">System.EventArgs</span> instance containing the event data.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_OnAfterUnsetup_" data-uid="SpiceSharp.Simulations.Simulation.OnAfterUnsetup*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_OnAfterUnsetup_System_EventArgs_" data-uid="SpiceSharp.Simulations.Simulation.OnAfterUnsetup(System.EventArgs)">OnAfterUnsetup(EventArgs)</h4>
  <div class="markdown level1 summary"><p>Raises the <a class="xref" href="SpiceSharp.Simulations.Simulation.html#SpiceSharp_Simulations_Simulation_AfterUnsetup">AfterUnsetup</a> event.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected virtual void OnAfterUnsetup(EventArgs args)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventArgs</span></td>
        <td><span class="parametername">args</span></td>
        <td><p>The <span class="xref">System.EventArgs</span> instance containing the event data.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_OnAfterValidation_" data-uid="SpiceSharp.Simulations.Simulation.OnAfterValidation*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_OnAfterValidation_System_EventArgs_" data-uid="SpiceSharp.Simulations.Simulation.OnAfterValidation(System.EventArgs)">OnAfterValidation(EventArgs)</h4>
  <div class="markdown level1 summary"><p>Raises the <a class="xref" href="SpiceSharp.Simulations.Simulation.html#SpiceSharp_Simulations_Simulation_AfterValidation">AfterValidation</a> event.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected virtual void OnAfterValidation(EventArgs args)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventArgs</span></td>
        <td><span class="parametername">args</span></td>
        <td><p>The <span class="xref">System.EventArgs</span> instance containing the event data.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_OnBeforeExecute_" data-uid="SpiceSharp.Simulations.Simulation.OnBeforeExecute*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_OnBeforeExecute_SpiceSharp_Simulations_BeforeExecuteEventArgs_" data-uid="SpiceSharp.Simulations.Simulation.OnBeforeExecute(SpiceSharp.Simulations.BeforeExecuteEventArgs)">OnBeforeExecute(BeforeExecuteEventArgs)</h4>
  <div class="markdown level1 summary"><p>Raises the <a class="xref" href="SpiceSharp.Simulations.Simulation.html#SpiceSharp_Simulations_Simulation_BeforeExecute">BeforeExecute</a> event.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected virtual void OnBeforeExecute(BeforeExecuteEventArgs args)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.BeforeExecuteEventArgs.html">BeforeExecuteEventArgs</a></td>
        <td><span class="parametername">args</span></td>
        <td><p>The <a class="xref" href="SpiceSharp.Simulations.BeforeExecuteEventArgs.html">BeforeExecuteEventArgs</a> instance containing the event data.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_OnBeforeSetup_" data-uid="SpiceSharp.Simulations.Simulation.OnBeforeSetup*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_OnBeforeSetup_System_EventArgs_" data-uid="SpiceSharp.Simulations.Simulation.OnBeforeSetup(System.EventArgs)">OnBeforeSetup(EventArgs)</h4>
  <div class="markdown level1 summary"><p>Raises the <a class="xref" href="SpiceSharp.Simulations.Simulation.html#SpiceSharp_Simulations_Simulation_BeforeSetup">BeforeSetup</a> event.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected virtual void OnBeforeSetup(EventArgs args)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventArgs</span></td>
        <td><span class="parametername">args</span></td>
        <td><p>The <span class="xref">System.EventArgs</span> instance containing the event data.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_OnBeforeUnsetup_" data-uid="SpiceSharp.Simulations.Simulation.OnBeforeUnsetup*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_OnBeforeUnsetup_System_EventArgs_" data-uid="SpiceSharp.Simulations.Simulation.OnBeforeUnsetup(System.EventArgs)">OnBeforeUnsetup(EventArgs)</h4>
  <div class="markdown level1 summary"><p>Raises the <a class="xref" href="SpiceSharp.Simulations.Simulation.html#SpiceSharp_Simulations_Simulation_BeforeUnsetup">BeforeUnsetup</a> event.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected virtual void OnBeforeUnsetup(EventArgs args)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventArgs</span></td>
        <td><span class="parametername">args</span></td>
        <td><p>The <span class="xref">System.EventArgs</span> instance containing the event data.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_OnBeforeValidation_" data-uid="SpiceSharp.Simulations.Simulation.OnBeforeValidation*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_OnBeforeValidation_System_EventArgs_" data-uid="SpiceSharp.Simulations.Simulation.OnBeforeValidation(System.EventArgs)">OnBeforeValidation(EventArgs)</h4>
  <div class="markdown level1 summary"><p>Raises the <a class="xref" href="SpiceSharp.Simulations.Simulation.html#SpiceSharp_Simulations_Simulation_BeforeValidation">BeforeValidation</a> event.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected virtual void OnBeforeValidation(EventArgs args)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventArgs</span></td>
        <td><span class="parametername">args</span></td>
        <td><p>The <span class="xref">System.EventArgs</span> instance containing the event data.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_OnExport_" data-uid="SpiceSharp.Simulations.Simulation.OnExport*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_OnExport_SpiceSharp_Simulations_ExportDataEventArgs_" data-uid="SpiceSharp.Simulations.Simulation.OnExport(SpiceSharp.Simulations.ExportDataEventArgs)">OnExport(ExportDataEventArgs)</h4>
  <div class="markdown level1 summary"><p>Raises the <a class="xref" href="SpiceSharp.Simulations.Simulation.html#SpiceSharp_Simulations_Simulation_ExportSimulationData">ExportSimulationData</a> event.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected virtual void OnExport(ExportDataEventArgs args)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.ExportDataEventArgs.html">ExportDataEventArgs</a></td>
        <td><span class="parametername">args</span></td>
        <td><p>The <a class="xref" href="SpiceSharp.Simulations.ExportDataEventArgs.html">ExportDataEventArgs</a> instance containing the event data.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_Rerun_" data-uid="SpiceSharp.Simulations.Simulation.Rerun*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_Rerun" data-uid="SpiceSharp.Simulations.Simulation.Rerun">Rerun()</h4>
  <div class="markdown level1 summary"><p>Reruns the <a class="xref" href="SpiceSharp.Simulations.ISimulation.html">ISimulation</a> with the previous behaviors.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public virtual void Rerun()</code></pre>
  </div>
  <a id="SpiceSharp_Simulations_Simulation_Run_" data-uid="SpiceSharp.Simulations.Simulation.Run*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_Run_SpiceSharp_Entities_IEntityCollection_" data-uid="SpiceSharp.Simulations.Simulation.Run(SpiceSharp.Entities.IEntityCollection)">Run(IEntityCollection)</h4>
  <div class="markdown level1 summary"><p>Runs the <a class="xref" href="SpiceSharp.Simulations.ISimulation.html">ISimulation</a> on the specified <a class="xref" href="SpiceSharp.Entities.IEntityCollection.html">IEntityCollection</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public virtual void Run(IEntityCollection entities)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Entities.IEntityCollection.html">IEntityCollection</a></td>
        <td><span class="parametername">entities</span></td>
        <td><p>The entities.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_TryGetState_" data-uid="SpiceSharp.Simulations.Simulation.TryGetState*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_TryGetState__1___0__" data-uid="SpiceSharp.Simulations.Simulation.TryGetState``1(``0@)">TryGetState&lt;S&gt;(out S)</h4>
  <div class="markdown level1 summary"><p>Tries to get a state of the specified type.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public virtual bool TryGetState&lt;S&gt;(out S state)
    where S : ISimulationState</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">S</span></td>
        <td><span class="parametername">state</span></td>
        <td><p>The state.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Boolean</span></td>
        <td><p><code>true</code> if the state exists; otherwise <code>false</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">S</span></td>
        <td><p>The simulation state type.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_UsesBehaviors_" data-uid="SpiceSharp.Simulations.Simulation.UsesBehaviors*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_UsesBehaviors__1" data-uid="SpiceSharp.Simulations.Simulation.UsesBehaviors``1">UsesBehaviors&lt;B&gt;()</h4>
  <div class="markdown level1 summary"><p>Checks if the class uses the specified behaviors.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public virtual bool UsesBehaviors&lt;B&gt;()
    where B : IBehavior</code></pre>
  </div>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Boolean</span></td>
        <td><p><code>true</code> if the class uses the behavior; otherwise <code>false</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">B</span></td>
        <td><p>The behavior type.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_UsesState_" data-uid="SpiceSharp.Simulations.Simulation.UsesState*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_UsesState__1" data-uid="SpiceSharp.Simulations.Simulation.UsesState``1">UsesState&lt;S&gt;()</h4>
  <div class="markdown level1 summary"><p>Checks if the class uses the specified state.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public virtual bool UsesState&lt;S&gt;()
    where S : ISimulationState</code></pre>
  </div>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.Boolean</span></td>
        <td><p><code>true</code> if the class uses the state; otherwise <code>false</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">S</span></td>
        <td><p>The simulation state type.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_Validate_" data-uid="SpiceSharp.Simulations.Simulation.Validate*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_Validate_SpiceSharp_Entities_IEntityCollection_" data-uid="SpiceSharp.Simulations.Simulation.Validate(SpiceSharp.Entities.IEntityCollection)">Validate(IEntityCollection)</h4>
  <div class="markdown level1 summary"><p>Validates the input.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected abstract void Validate(IEntityCollection entities)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Entities.IEntityCollection.html">IEntityCollection</a></td>
        <td><span class="parametername">entities</span></td>
        <td><p>The entities.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.ArgumentNullException</span></td>
        <td><p>Thrown if <code data-dev-comment-type="paramref" class="paramref">entities</code> is <code>null</code>.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.ValidationFailedException.html">ValidationFailedException</a></td>
        <td><p>Thrown if the validation failed.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Simulations_Simulation_Validate_" data-uid="SpiceSharp.Simulations.Simulation.Validate*"></a>
  <h4 id="SpiceSharp_Simulations_Simulation_Validate_SpiceSharp_Validation_IRules_SpiceSharp_Entities_IEntityCollection_" data-uid="SpiceSharp.Simulations.Simulation.Validate(SpiceSharp.Validation.IRules,SpiceSharp.Entities.IEntityCollection)">Validate(IRules, IEntityCollection)</h4>
  <div class="markdown level1 summary"><p>A default implementation for validating entities and behaviors using the specified rules.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">protected void Validate(IRules rules, IEntityCollection entities)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Validation.IRules.html">IRules</a></td>
        <td><span class="parametername">rules</span></td>
        <td><p>The rules.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="SpiceSharp.Entities.IEntityCollection.html">IEntityCollection</a></td>
        <td><span class="parametername">entities</span></td>
        <td><p>The entities.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Simulations.ValidationFailedException.html">ValidationFailedException</a></td>
        <td><p>Thrown if the validation failed.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="events">Events
  </h3>
  <h4 id="SpiceSharp_Simulations_Simulation_AfterExecute" data-uid="SpiceSharp.Simulations.Simulation.AfterExecute">AfterExecute</h4>
  <div class="markdown level1 summary"><p>Occurs after the simulation has executed.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public event EventHandler&lt;AfterExecuteEventArgs&gt; AfterExecute</code></pre>
  </div>
  <h5 class="eventType">Event Type</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventHandler</span>&lt;<a class="xref" href="SpiceSharp.Simulations.AfterExecuteEventArgs.html">AfterExecuteEventArgs</a>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h4 id="SpiceSharp_Simulations_Simulation_AfterSetup" data-uid="SpiceSharp.Simulations.Simulation.AfterSetup">AfterSetup</h4>
  <div class="markdown level1 summary"><p>Occurs after the simulation is set up.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public event EventHandler&lt;EventArgs&gt; AfterSetup</code></pre>
  </div>
  <h5 class="eventType">Event Type</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventHandler</span>&lt;<span class="xref">System.EventArgs</span>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h4 id="SpiceSharp_Simulations_Simulation_AfterUnsetup" data-uid="SpiceSharp.Simulations.Simulation.AfterUnsetup">AfterUnsetup</h4>
  <div class="markdown level1 summary"><p>Occurs after the simulation is destroyed.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public event EventHandler&lt;EventArgs&gt; AfterUnsetup</code></pre>
  </div>
  <h5 class="eventType">Event Type</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventHandler</span>&lt;<span class="xref">System.EventArgs</span>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h4 id="SpiceSharp_Simulations_Simulation_AfterValidation" data-uid="SpiceSharp.Simulations.Simulation.AfterValidation">AfterValidation</h4>
  <div class="markdown level1 summary"><p>Occurs after the simulation has validated the input.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public event EventHandler&lt;EventArgs&gt; AfterValidation</code></pre>
  </div>
  <h5 class="eventType">Event Type</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventHandler</span>&lt;<span class="xref">System.EventArgs</span>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h4 id="SpiceSharp_Simulations_Simulation_BeforeExecute" data-uid="SpiceSharp.Simulations.Simulation.BeforeExecute">BeforeExecute</h4>
  <div class="markdown level1 summary"><p>Occurs before the simulation starts its execution.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public event EventHandler&lt;BeforeExecuteEventArgs&gt; BeforeExecute</code></pre>
  </div>
  <h5 class="eventType">Event Type</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventHandler</span>&lt;<a class="xref" href="SpiceSharp.Simulations.BeforeExecuteEventArgs.html">BeforeExecuteEventArgs</a>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h4 id="SpiceSharp_Simulations_Simulation_BeforeSetup" data-uid="SpiceSharp.Simulations.Simulation.BeforeSetup">BeforeSetup</h4>
  <div class="markdown level1 summary"><p>Occurs before the simulation is set up.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public event EventHandler&lt;EventArgs&gt; BeforeSetup</code></pre>
  </div>
  <h5 class="eventType">Event Type</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventHandler</span>&lt;<span class="xref">System.EventArgs</span>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h4 id="SpiceSharp_Simulations_Simulation_BeforeUnsetup" data-uid="SpiceSharp.Simulations.Simulation.BeforeUnsetup">BeforeUnsetup</h4>
  <div class="markdown level1 summary"><p>Occurs before the simulation is destroyed.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public event EventHandler&lt;EventArgs&gt; BeforeUnsetup</code></pre>
  </div>
  <h5 class="eventType">Event Type</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventHandler</span>&lt;<span class="xref">System.EventArgs</span>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h4 id="SpiceSharp_Simulations_Simulation_BeforeValidation" data-uid="SpiceSharp.Simulations.Simulation.BeforeValidation">BeforeValidation</h4>
  <div class="markdown level1 summary"><p>Occurs before the simulation starts validating the input.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public event EventHandler&lt;EventArgs&gt; BeforeValidation</code></pre>
  </div>
  <h5 class="eventType">Event Type</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventHandler</span>&lt;<span class="xref">System.EventArgs</span>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h4 id="SpiceSharp_Simulations_Simulation_ExportSimulationData" data-uid="SpiceSharp.Simulations.Simulation.ExportSimulationData">ExportSimulationData</h4>
  <div class="markdown level1 summary"><p>Occurs when simulation data can be exported.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="decalaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public event EventHandler&lt;ExportDataEventArgs&gt; ExportSimulationData</code></pre>
  </div>
  <h5 class="eventType">Event Type</h5>
  <table class="table table-bordered table-striped table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="xref">System.EventHandler</span>&lt;<a class="xref" href="SpiceSharp.Simulations.ExportDataEventArgs.html">ExportDataEventArgs</a>&gt;</td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <h3 id="implements">Implements</h3>
  <div>
      <a class="xref" href="SpiceSharp.Simulations.IEventfulSimulation.html">IEventfulSimulation</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.Simulations.ISimulation.html">ISimulation</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.Simulations.IStateful.html">IStateful</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.Simulations.IBehavioral.html">IBehavioral</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.ParameterSets.IParameterSetCollection.html">IParameterSetCollection</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.ParameterSets.IParameterSet.html">IParameterSet</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.ICloneable.html">ICloneable</a>
  </div>
  <h3 id="extensionmethods">Extension Methods</h3>
  <div>
      <a class="xref" href="SpiceSharp.Utility.html#SpiceSharp_Utility_ThrowIfNull__1___0_System_String_">Utility.ThrowIfNull&lt;T&gt;(T, String)</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.Reflection.Documentation.html#SpiceSharp_Reflection_Documentation_Parameters_SpiceSharp_ParameterSets_IParameterSetCollection_">Documentation.Parameters(IParameterSetCollection)</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.Reflection.Documentation.html#SpiceSharp_Reflection_Documentation_Parameters_SpiceSharp_ParameterSets_IParameterSet_">Documentation.Parameters(IParameterSet)</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.Reflection.Documentation.html#SpiceSharp_Reflection_Documentation_ParameterValues__1_SpiceSharp_ParameterSets_IParameterSetCollection_System_Boolean_">Documentation.ParameterValues&lt;T&gt;(IParameterSetCollection, Boolean)</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.Reflection.Documentation.html#SpiceSharp_Reflection_Documentation_ParameterValues__1_SpiceSharp_ParameterSets_IParameterSet_System_Boolean_">Documentation.ParameterValues&lt;T&gt;(IParameterSet, Boolean)</a>
  </div>
  <h3 id="seealso">See Also</h3>
  <div class="seealso">
      <div><a class="xref" href="SpiceSharp.ParameterSets.ParameterSetCollection.html">ParameterSetCollection</a></div>
      <div><a class="xref" href="SpiceSharp.Simulations.IEventfulSimulation.html">IEventfulSimulation</a></div>
  </div>
</article>
          </div>
          
          <div class="hidden-sm col-md-2" role="complementary">
            <div class="sideaffix">
              <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
              <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
              </nav>
            </div>
          </div>
        </div>
      </div>
      
      <footer>
        <div class="grad-bottom"></div>
        <div class="footer">
          <div class="container">
            <span class="pull-right">
              <a href="#top">Back to top</a>
            </span>
            
            <span>Generated by <strong>DocFX</strong></span>
          </div>
        </div>
      </footer>
    </div>
    
    <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
    <script type="text/javascript" src="../styles/docfx.js"></script>
    <script type="text/javascript" src="../styles/main.js"></script>
  </body>
</html>
